<template>
    <div>
        <header>
            <el-form  class="searchWrap" :size="customStyle.size" :model="sendData">
                <el-form-item>
                    <el-input v-model="sendData.username" placeholder="请输入用户名"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-date-picker
                        v-model="sendData.create_time"
                        type="date"
                        format="yyyy 年 MM 月 dd 日"
                        value-format="yyyy_MM_dd"
                        placeholder="选择日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" :size="customStyle.size" @click="getTableData()">搜 索</el-button>
                </el-form-item>
            </el-form>
        </header>
        <el-table
            :data="tableData"
            border
            stripe
        >
            <el-table-column
                prop="create_time"
                width="100px"
                label="时间">
            </el-table-column>
            <el-table-column
                prop="log"
                min-width="100px"
                label="日志内容">
                <template #default="scope">
                    <div class="logInfo" v-html="scope.row.input || scope.row.log"></div>
                    <div class="logInfo" v-html="scope.row.output"></div>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
import {getLog} from '@/api/order'
import moment from 'moment'
import tableMixin from '@/mixins/table'
import {getTag} from "@/api/tag";
import OrderInfo from "@/components/order-info";
const evil = window.eval;
export default {
    name: "record",
    components:{
        OrderInfo
    },
    mixins:[tableMixin],
    data() {
        return {
            platformData:[],
            sendData:{
                username:'',
                create_time:'',
            },
            dialogVisible: false,
        }
    },
    created() {
        this.sendData.create_time =moment().format('YYYY_MM_DD');
        //关闭页面异常订单风控
        getTag({type:0}).then(res=>{
            this.platformData=res.data
        })
    },
    methods: {
        evil,
        tableApi:getLog,
    }
}
</script>

<style scoped lang="scss">

</style>